import store from "../../store";
export default function setSpecialTemplateParams(list) {
    !list && (
        list = store.getters["getConfigParams"].templateConfigList
    );
    console.log("打印list",list)
    let specialTemplate = list.find(item => item.tpDesc === "specialtemplateforaddpages");
    if (specialTemplate) {
        store.commit("gw/setSpecialTemplate", JSON.parse(specialTemplate.tpConfig));
        if (window.environment === "edit") {
            store.commit("gw/setSpecialTemplate", JSON.parse(specialTemplate.tpConfig));
            store.commit("gw/setSpecialTemplateParams", specialTemplate);
            store.commit("gw/setNeedUploadSpecialTemplate", false);
        }
        return specialTemplate;
    }
    store.commit("gw/setSpecialTemplateParams", {});
    store.commit("gw/setSpecialTemplate", {});
    store.commit("gw/setNeedUploadSpecialTemplate", true);
}